﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using nwrole.toolbox.sync.entity;
using nwrole.toolbox.sync;
using sync_test.maps;

namespace sync_test.action
{
    public class CreateSyncMap
    {
        /*
        public static List<SyncEntity> Run(GhostTableSync sync)
        {

            List<SyncEntity> maps = CreateSyncMapList(new String[] { 
                          "INTRESSENTTYP",
                          "ANDAMALTYP",
                          "OBJEKTTYP",
                          "OBJEKTYTATYP",
                          "UTHYRNINGSSPARRTYP",
                          "INTRESSENTTELEFONTYP",
                          "KONTRAKTINTRESSENTTYP",
                          "KUNDINTRESSENTTYP",
                          "ADRESSTYP",
                          "TEXTERTYP",
                          "OMRADETYP",
                          "FASTIGHET",
                          "OMRADE",
                          "BYGGNAD",
                          "UPPGANG",
                          "OBJEKTOMRADE",
                          "FASTOMRADE",
                          "OBJEKT",
                          "OBJEKTYTA",
                          "UTHYRNINGSSPARR",
                          "OBJEKTOMRADE",
                          "HYRESDEL",
                          "OBJEKTSBUNDET",
                          "BESKRIVNING",
                          "BESKRIVNINGGRUPP", 
                          "BESKRIVNINGALTERNATIV",
                          "OBJEKTANDAMAL",
                          "BYGGNADYTA",
                          "FASTYTATYP",
                          "FASTYTA",
                          "INTRESSENT",
                          "ADRESS",
                          "INTRESSENTTELEFON", 
                          "KUND",
                          "KUNDAVIADRESS",
                          "KONTRAKT" ,
                          "KUNDINTRESSENT",
                          "KONTRAKTINTRESSENT"
                      }, sync);
            // maps.Clear();
            SyncEntity se1 = TEXTER.Mapping;
            se1.SortIndex = 7;
            maps.Add(TEXTER.Mapping);


            return maps;
        }
        
        public static List<SyncEntity> CreateSyncMapList(string[] tableNames, GhostTableSync sync)
        {
            try
            {
                // System.Console.Write("Creating SyncMap " + tableName + " ....");
                // setup sync
                var result = sync.CreateSyncMapList("WF", tableNames);
                return result;
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
            return null;
        }
         * */
    }
}
